<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/4/12
 * Time: 17:50
 */
use \Event as Event;
use \EventBase as EventBase;

$eventBase = new EventBase();
$event = new Event($eventBase, -1, Event::PERSIST | Event::TIMEOUT, function(){
   echo '1hello event';
});

$event->add(0.1);
$eventBase->loop();